package com.hwl.demo23;

import com.hwl.demo23.entity.ObjectStructure;
import com.hwl.demo23.service.impl.*;

/**
 * 访问者模式
 *
 * @author sentry
 * @since 2023-03-26
 */
public class Main {

    public static void main(String[] args) {
        ObjectStructure o = new ObjectStructure();
        o.attach(new Man());
        o.attach(new Woman());

        o.display(new Success());
        o.display(new Failing());
        o.display(new Amativeness());
        o.display(new Marriage());
    }
}
